package com.wswy.wyjk.api;

import com.my.httpapi.api.baseApi.BaseHttpResult;
import com.wswy.wyjk.api.entity.AdverConfigEntity;
import com.wswy.wyjk.api.entity.DeviceMod;
import com.wswy.wyjk.ui.login.model.CaptchaData;
import com.wswy.wyjk.ui.login.model.CaptchaValidData;
import com.wswy.wyjk.ui.login.model.LoginResponse;
import com.wswy.wyjk.ui.login.model.SendPicResponse;
import com.wswy.wyjk.ui.login.model.VerificationPicResponse;
import com.wswy.wyjk.ui.main.model.ErrResponse;
import com.wswy.wyjk.ui.main.model.RankResponse;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

public interface ApiService {
    @FormUrlEncoded()
    @POST("system/uuid")
    Observable<BaseHttpResult<DeviceMod>> requestDevice(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("v1/advert/conf")
    Observable<BaseHttpResult<AdverConfigEntity>> getAdvertConfig(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("captcha/get")
    Observable<BaseHttpResult<CaptchaData>> getCaptcha(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("captcha/tencent-verify")
    Observable<BaseHttpResult<CaptchaValidData>> validCaptchaTc(@FieldMap Map<String, String> params);

    @FormUrlEncoded()
    @POST("login/sms")
    Observable<BaseHttpResult<LoginResponse>> login(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("phone/sms")
    Observable<BaseHttpResult<Boolean>> code(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("captcha/image")
    Observable<BaseHttpResult<SendPicResponse>> sendPic(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("captcha/verify")
    Observable<BaseHttpResult<VerificationPicResponse>> verificationPic(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("answer/record")
    Observable<BaseHttpResult<Boolean>> uploadErr(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("exam/ranking")
    Observable<BaseHttpResult<RankResponse>> rankList(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("")
    Observable<BaseHttpResult<ErrResponse>> getErr(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("exam/record")
    Observable<BaseHttpResult<Boolean>> record(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("login/logout")
    Observable<BaseHttpResult<Boolean>> logout(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("login/cancel")
    Observable<BaseHttpResult<Boolean>> loginCancel(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("answer/list")
    Observable<BaseHttpResult<ErrResponse>> answerList(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("favorites/list")
    Observable<BaseHttpResult<ErrResponse>> favoritesList(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("answer/empty")
    Observable<BaseHttpResult<Boolean>> answerEmpty(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("favorites/empty")
    Observable<BaseHttpResult<Boolean>> favoritesEmpty(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("favorites/cancel")
    Observable<BaseHttpResult<Boolean>> favoritesCancel(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("favorites/add")
    Observable<BaseHttpResult<Boolean>> favoritesAdd(@FieldMap Map<String, String> map);

}
